package com.iecas.context;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import com.iecas.entity.Bullet;
import com.iecas.entity.Tank;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class GlobalContext {
    public static ServerContext serverContext = new ServerContext();
    public static ClientContext clientContext = new ClientContext();

    public static ServerContext getServerContext() {
        return serverContext;
    }

    public static ClientContext getClientContext() {
        return clientContext;
    }

    public static void setClientContext(ServerContext serverContext) {
        BeanUtil.copyProperties(serverContext, clientContext);
    }
}
